package com.csun.cmny.provider.dao;

import com.csun.cmny.provider.model.domain.DmcCsunButtonLocation;
import com.csun.cmny.provider.model.dto.button.CsunButtonPageQuery;
import com.csun.cmny.provider.model.dto.csunbutton.BedOldmanCsunButtonReqDto;
import com.csun.cmny.provider.model.dto.propertyManagement.SelectDeviceDataDto;
import com.csun.cmny.provider.model.vo.CsunButtonReqVo;
import com.csun.cmny.provider.model.vo.csunbutton.DmcCsunButtonVo;
import com.csun.cmny.provider.model.vo.propertyManagement.PropertyDataVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface DmcCsunButtonLocationMapper extends Mapper<DmcCsunButtonLocation> {

    /**
     * query csun button list with page
     *
     * @param csunButtonPageQuery   csun button page query
     *
     * @return  the list.
     */
    List<DmcCsunButtonVo> queryGroupCsunButtonListWithPage(CsunButtonPageQuery csunButtonPageQuery);

    /**
     * @description: TODO 
     * @param: oldmanId 老人ID
     * @return: 老人最近一次报警数据
     * @throws 
     * @author huangxm
     * @date 2019/3/15 13:39 
     */
    Map<String,Object> getRecentData(@Param("oldmanId")Integer oldmanId);


    /**
     * query csun button by bed oldman list
     *
     * @param bedOldmanCsunButtonReqDtoList bed oldman csun button req dto list
     *
     * @return the lis.
     */
    List<CsunButtonReqVo> queryCsunButtonByBedOldmanList(@Param("bedOldmanCsunButtonReqDtoList") List<BedOldmanCsunButtonReqDto> bedOldmanCsunButtonReqDtoList);

    List<PropertyDataVo> selectDeviceData(SelectDeviceDataDto selectDeviceDataDto);
    //查询该设备报警时间间隔
    DmcCsunButtonVo queryGroupCsunButton(CsunButtonPageQuery csunButtonPageQuery);
    /**
     * 添加紧急按钮报警时间
     */
    Integer updateAlarmTime(DmcCsunButtonLocation dmcCsunButton);
}